<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
	<head>
		<base href="<%=basePath%>">

		<title>My JSP 'Pet_index.jsp' starting page</title>

		<meta http-equiv="pragma" content="no-cache">
		<meta http-equiv="cache-control" content="no-cache">
		<meta http-equiv="expires" content="0">
		<meta http-equiv="keywords" content="keyword1,keyword2,keyword3">
		<meta http-equiv="description" content="This is my page">
		<!--
	<link rel="stylesheet" type="text/css" href="styles.css">
	-->
		<link rel="stylesheet" href="css/style.css" type="text/css"></link>
	</head>

	<body>
		<center>
			<div id="top">
				<%@ include file="top.jsp"%>
			</div>
			<div id="center">
				<div id="centerleft">
					<img src="image/1-home_07.gif" border="0" />
					<div id="menulist">
						<!--功能菜单开始-->
						<!--功能菜单结束-->
					</div>
					<img src="image/1-home_02.gif" border="0" id="i2" />
				</div>
				<div id="centerright">
					<div id="guide">
						您现在所在的位置：宠物在线系统>>查看订单>>订单列表显示
					</div>
					<div id="main">
						共
						<s:property value="intRowCount" />
						个记录,分
						<s:property value="intPageCount" />
						页显示,当前页面是:第
						<s:property value="pageNow" />
						页
						<table width="625">
							<tr class="showorder">
								<th width="100" height="32">
									信息
								</th>
								<th width="60">
									信息日期
								</th>
								<th width="60">
									用户名称
								</th>
								<th width="50">
									总价
								</th>
								<th width="130">
									宠物信息
								</th>
								<th width="60">
									详细信息
								</th>
								<th width="60">
									状态
								</th>
								
							</tr>
							<s:iterator value="messages">
								<tr  class="showorder">
									<td>
										<s:property value="message_Name" />
									</td>
									<td align="center">
										<s:property value="message_Date" />
									</td>
									<td align="right">
										<s:property value="user_Name" />
									</td>
									<td align="right">
										<s:property value="money" />
									</td>
									<td align="right">
										<s:property value="pet_message" />
									</td>
									<td align="center">
										<s:a href="showOrder?Message_Id=%{message_id}">详细</s:a>
									</td>
									<td align="center">
										<s:if test="message_State==1">
										尚未处理</s:if>
										<s:elseif test="message_State==0">
										拒绝
										</s:elseif>
										<s:else>
										已发货
										</s:else>
										
									</td>
								</tr>
							</s:iterator>
						</table>
						<s:url id="url_pre" value="OrderList.action">
							<s:param name="pageNow" value="pageNow-1"></s:param>
						</s:url>

						<s:url id="url_next" value="OrderList.action">
							<s:param name="pageNow" value="pageNow+1"></s:param>
						</s:url>
						<s:iterator value="messages" status="status">
							<s:url id="url" value="OrderList.action">
								<s:param name="pageNow" value="pageNow" />
							</s:url>
						</s:iterator>
						<s:if test="pageNow==1">
							<s:a href="%{url_pre}" cssStyle="color:#535353">首页</s:a>
						</s:if>
						<s:else>
							<s:a href="%{url_pre}">上一页</s:a>
						</s:else>
						<s:bean name="org.apache.struts2.util.Counter" id="counter">
							<s:param name="first" value="1" />
							<s:param name="last" value="intPageCount" />
							<s:iterator>
								<s:a href="OrderList.action?pageNow=%{current-1}">
									<font size="2" color="#A994A4"><s:property />页</font>
								</s:a>
							</s:iterator>
						</s:bean>
						<s:if test="pageNow==intPageCount">
							<s:a href="%{url_next}">末页</s:a>
						</s:if>
						<s:else>
							<s:a href="%{url_next}">下一页</s:a>
						</s:else>

						<div align="center"></div>
					</div>
				</div>
				<div style="clear: both"></div>
			</div>
		</center>
	</body>
</html>
